L=1000000000; S=4; T=6; M=100; stones=[227012949,227012948,227012946,227012951,227012942,227012952,227012945,227012941,227012953,227012944,108208988,98549915,27525393,41959975,264063661,355204785,292138545,36311731,35127169,227012943,28778233,28778228,28778231,28778223,451358524,28778230,252512261,28778226,355470041,117616426,113831316,28778234,28778225,714168577,53610100,233494801,28778235,28778229,28778224,377082245,327833879,327833872,327833878,327833873,327833867,327833869,327833877,509782605,327833876,201256439,327833874,327833868,327833870,63936076,584150626,61896561,236474561,662741821,158732113,367322905,125958589,125958580,125958588,177509911,125958585,125958587,125958578,811743352,125958579,306395137,149800771,125958583,125958584,423198121,125958577,125958581,125958582,496696289,1559800,125958586,293833045,293833046,293833036,46406323,461458465,293833044,293833043,133293789,293833040,293833038,485280151,293833048,293833041,87000967,346167997,63066169,293833039,249942353,430322548,151980862];